﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;

namespace tracker.Models.DAL
{
    public class StatusDefineDAL:ErpCatalogueBaseBL
    {
        #region Properties Define
        private string FIELD_USER = "UserName";

        #endregion

        #region STORE NAME
        public const string STATUSDEFINE_SELECTBYUSERNAME = "StatusDefine_SelectByUserName";
        
        #endregion

        public DataTable getByUsername(string userName)
        {
            DataSet ds = ErpCatalogueBaseBL.SelectAllWithParameter(STATUSDEFINE_SELECTBYUSERNAME,
                                                                 new string[] { FIELD_USER },
                                                                 new object[] { userName });
            if (Utilities.hasRow(ds))
            {
                return ds.Tables[0];
            }
            return null;
        }
    }
}